<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //变量
let num; num=10;
console.log(num); 
let NUM; 
NUM=1000;
console.log(NUM); 
let str;
console.log(str); //未定义
// 常量:定义之后不能修改
const userName = 'admin'; 
console.log(userName);
// userName = 'xiaoming';//不可以重新给常量赋值，执行代码会报错。 
console.log('userName');
</script>
</html>